﻿using Microsoft.EntityFrameworkCore;
using MySqlStudent.UI.Models;

namespace MySqlStudent.UI.Application
{
    public static class ModelBuilderExtentsions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
            // 指定实体在数据库中生成的名称
            modelBuilder.Entity<Course>().ToTable("Course");
            modelBuilder.Entity<StudentCourse>().ToTable("StudentCourse");
            modelBuilder.Entity<Student>().ToTable("Student");
        }
    }
}